package net.hhk.data;

import android.app.Application;
import android.content.SharedPreferences;


public class MySharePreferences extends Application {
	SharedPreferences pref;
	SharedPreferences.Editor editor;

	@Override
	public void onCreate() {

		pref = getSharedPreferences("blogKey", MODE_PRIVATE);
		super.onCreate();
	}

	public void setExitString(String key, String str) {

		editor = pref.edit();
		editor.putString(key, str);

		editor.commit();
	}

	public String getExitString(String key) {

		String str = pref.getString(key, "");

		return str;
	}
	public void setExitInt(String key, int value) {

		editor = pref.edit();
		editor.putInt(key,value);

		editor.commit();
	}

	public int getExitInt(String key,int defaul) {

		int str = pref.getInt(key,defaul);

		return str;
	}

}
